<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class HomeController extends Controller
{
    public function index()
    {
        $adminId  = session()->get('admin_id', '0');
        if (empty($adminId)){
            return redirect('/isLogin');
        }
        return view('home.home');
    }

    public function doHome(Request $request)
    {

        return view('home.dohome', [
            "admin" => $request->session()->get('username', '')
        ]);

    }


}
